function getCity(){
    let defaultCity = "武汉";
    if(localStorage.getItem("city")){
        defaultCity = localStorage.getItem("city")
    }
    return defaultCity
}

const cityHooks = {
    state: {
        city:getCity()
    },
    mutations: {
        changeCity(state,val){  
            localStorage.setItem("city",val)
            state.city = val
        }
    },
    actions: {
    },
} 
export default cityHooks